home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / TCUTIL.H < prev    next >
Text File  |  1993-04-04  |  7KB  |  208 lines

  1. #if __STDC__
  2. #define _Cdecl
  3. #else
  4. #define _Cdecl  cdecl
  5. #endif
  6.  
  7. #ifndef va_start
  8. #include <stdarg.h>
  9. #endif
  10.  
  11. #define BLACK   0x00                    /* foreground */
  12. #define RED     0x04                    /* background */
  13. #define GREEN   0x02                    /* colors */
  14. #define YELLOW  0x06                    /* bg << 4 | fg */
  15. #define BLUE    0x01
  16. #define MAGENTA 0x05
  17. #define CYAN    0x03
  18. #define WHITE   0x07
  19. #define BLINK   0x80
  20. #define BOLD    0x08
  21. #define NDISPB  0x00                    /* non display black */
  22. #define NDISPW  0x77                    /* non display white */
  23. #define RVIDEO  0x70                    /* reverse video */
  24. #define UNLINE  0x01                    /* under line (BLUE) */
  25.  
  26. /* Values for special keys */
  27.  
  28. /*function keys*/
  29. #define K_F1  315
  30. #define K_F2  316
  31. #define K_F3  317
  32. #define K_F4  318
  33. #define K_F5  319
  34. #define K_F6  320
  35. #define K_F7  321
  36. #define K_F8  322
  37. #define K_F9  323
  38. #define K_F10 324
  39.  
  40. /*shifted function keys*/
  41. #define K_SF1  340
  42. #define K_SF2  341
  43. #define K_SF3  342
  44. #define K_SF4  343
  45. #define K_SF5  344
  46. #define K_SF6  345
  47. #define K_SF7  346
  48. #define K_SF8  347
  49. #define K_SF9  348
  50. #define K_SF10 349
  51.  
  52. /*CONTROL function keys*/
  53. #define K_CF1  350
  54. #define K_CF2  351
  55. #define K_CF3  352
  56. #define K_CF4  353
  57. #define K_CF5  354
  58. #define K_CF6  355
  59. #define K_CF7  356
  60. #define K_CF8  357
  61. #define K_CF9  358
  62. #define K_CF10 359
  63.  
  64. /*ALT + function keys*/
  65. #define K_AF1  360
  66. #define K_AF2  361
  67. #define K_AF3  362
  68. #define K_AF4  363
  69. #define K_AF5  364
  70. #define K_AF6  365
  71. #define K_AF7  366
  72. #define K_AF8  367
  73. #define K_AF9  368
  74. #define K_AF10 369
  75.  
  76. /*alternate keys*/
  77. #define K_ALTA 286
  78. #define K_ALTB 304
  79. #define K_ALTC 302
  80. #define K_ALTD 288
  81. #define K_ALTE 274
  82. #define K_ALTF 289
  83. #define K_ALTG 290
  84. #define K_ALTH 291
  85. #define K_ALTI 279
  86. #define K_ALTJ 292
  87. #define K_ALTK 293
  88. #define K_ALTL 294
  89. #define K_ALTM 306
  90. #define K_ALTN 305
  91. #define K_ALTO 280
  92. #define K_ALTP 281
  93. #define K_ALTQ 272
  94. #define K_ALTR 275
  95. #define K_ALTS 287
  96. #define K_ALTT 276
  97. #define K_ALTU 278
  98. #define K_ALTV 303
  99. #define K_ALTW 273
  100. #define K_ALTX 301
  101. #define K_ALTY 277
  102. #define K_ALTZ 300
  103.  
  104. /* cursor keypad */
  105. #define K_HOME   327
  106. #define K_END    335
  107. #define K_PGUP   329
  108. #define K_PGDN   337
  109. #define K_LEFT   331
  110. #define K_RIGHT  333
  111. #define K_UP     328
  112. #define K_DOWN   336
  113.  
  114. /*cntl + keypad*/
  115. #define K_CHOME    375
  116. #define K_CEND     373
  117. #define K_CPGUP    388
  118. #define K_CPGDN    374
  119. #define K_CLEFT    371
  120. #define K_CRIGHT   372
  121.  
  122. /*misc special keys*/
  123. #define K_ESC            27
  124. #define K_SPACE          32
  125. #define K_INS            338
  126. #define K_DEL            339
  127. #define K_TAB            9
  128. #define K_BACKTAB        15
  129. #define K_RETURN         13
  130. #define K_ENTER          13
  131. #define K_BACKSPACE  8
  132.  
  133.  
  134. #define setatr(fg,bg,blink,bold) ((blink|(bg<<4))|(fg|bold))
  135. #define setsize_w(trow,tcol,brow,bcol) (((brow-trow+1) * (bcol-tcol+1)) * 2)
  136. #define setsize_ws(trow,tcol,brow,bcol) (((brow-trow+2) * (bcol-tcol+3)) * 2)
  137.  
  138. /* Function prototypes for tcutilx.lib */
  139. void    _Cdecl  beep(unsigned int pitch, unsigned int nticks );
  140. void    _Cdecl  box(int trow, int tcol, int lrow, int lcol, int wattr, int battr);
  141. long    _Cdecl  calc_tots(char *curr_path);
  142. int     _Cdecl  ccolor(int row, int col, int attr, int len);
  143. int     _Cdecl  change_to(char *dir);
  144. void    _Cdecl  clr(int wattr);
  145. int     _Cdecl  clr_eol(int last_col);
  146. void    _Cdecl  clrarea(int trow,int tcol,int lrow,int lcol,int wattr);
  147. void    _Cdecl  clrbox(int trow,int tcol,int lrow,int lcol,int wattr);
  148. int     _Cdecl  cur_dn();
  149. int     _Cdecl  cur_lf();
  150. int     _Cdecl  cur_nl();
  151. int     _Cdecl  cur_rt();
  152. int     _Cdecl  cur_up();
  153. int     _Cdecl  file_exist(char *fn);
  154. int     _Cdecl  find_file(char *dir_str, char *file_spec, char *dir_hit, char *file_hit,char *srch_type);
  155. int     _Cdecl  flush_key();
  156. int     _Cdecl  get_akey(char *ch, char *list);
  157. int     _Cdecl  get_attr(int row, int col);
  158. int     _Cdecl  get_ca(char *ch, char *scan);
  159. int     _Cdecl  get_chars(int row, int col, int leng, char *string);
  160. int     _Cdecl  get_cur(int *row, int *col);
  161. int     _Cdecl  get_line(char *str, int sleng, int attr, int dleng);
  162. int     _Cdecl  get_xa();
  163. long    _Cdecl  getfsize(char *fn);
  164. int     _Cdecl  hide_cur();
  165. char *  _Cdecl  index(char *str, char c);
  166. int     _Cdecl  left_str(int x, char *str, char *new_str);
  167. int     _Cdecl  locate(int row, int col);
  168. int     _Cdecl  make_shadow(int trow, int tcol, int brow, int bcol);
  169. int     _Cdecl  make_window(int trow, int tcol, int brow, int bcol, int wattr, int battr, int shadow, char *title, char *footer);
  170. int     _Cdecl  melt(int attr, char type);
  171. int     _Cdecl  mid_str(int begin, int leng, char *o_str, char *n_str);
  172. int     _Cdecl  parse_fn(char *fspec,char *fdrive, char *fpath, char *fn, char *fe);
  173. int     _Cdecl  put_ca(char ch, int attr, int count);
  174. int     _Cdecl  put_sa(char *ch, int attr);
  175. void    _Cdecl  rcolor(int row, int col, int attr, int len);
  176. int     _Cdecl  rest_scr(int trow, int tcol, int brow, int bcol, char *array);
  177. int     _Cdecl  right_str(int x, char *str, char *new_str);
  178. int     _Cdecl  s_str_lf(int count, char *str);
  179. int     _Cdecl  s_str_rt(int count, char *str);
  180. int     _Cdecl  save_scr(int trow, int tcol, int brow, int bcol, char *array);
  181. int     _Cdecl  scroll_dn(int trow, int lcol,int brow, int rcol,int attr, int lines);
  182. int     _Cdecl  scroll_lf(int trow, int tcol, int brow, int bcol, int attr, int no_col);
  183. int     _Cdecl  scroll_rt(int trow, int tcol, int brow, int bcol, int attr, int no_col);
  184. int     _Cdecl  scroll_up(int trow, int lcol,int brow, int rcol,int attr, int lines);
  185. int     _Cdecl  set_mode(int mode);
  186. int     _Cdecl  show_cur(int size);
  187. int     _Cdecl  sread_a(int row, int col, int *attr);
  188. int     _Cdecl  sread_c(int row, int col, char *area);
  189. int     _Cdecl  sread_ca(int row, int col, char *area);
  190. int     _Cdecl  str_xform(char *str,char from,char to);
  191. int     _Cdecl  strip(char *str, char c);
  192. int     _Cdecl  striprange(char *str,char clo,char chi);
  193. int     _Cdecl  swrite_a(int row, int col, int attr);
  194. int     _Cdecl  swrite_c(int row, int col, char ch);
  195. int     _Cdecl  swrite_ca(int row, int col, char *area);
  196. int     _Cdecl  trim_l(char *str);
  197. int     _Cdecl  trim_r(char *str);
  198. int     _Cdecl  upcase(char *str);
  199. int     _Cdecl  validate(char *goods, char val_field);
  200. int     _Cdecl  video_type();
  201. int     _Cdecl  write_tty(char *ch);
  202. int     _Cdecl  writef(int row, int col, int attr, char *mch);
  203. int     _Cdecl  writef_n(int row, int col, int attr, char *mch, int count);
  204. int     _Cdecl  writefc(int row, int col, int attr, char mch);
  205. long    _Cdecl  get_long_date();
  206. int     _Cdecl  soundex(char *out_pntr, char *in_pntr);
  207. void    _Cdecl  xprintf(int row, int col,int attr,va_list arg_list, ...);
  208.